package com.bw.app.dao;

import com.bw.app.bean.TrafficChBean;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface TrafficDao {
    @Select("select\n" +
            "    ch,\n" +
            "    sum(uvCt) as uv_cts,\n" +
            "    sum(pvCt) as pv_cts,\n" +
            "    sum(durSum) as dur_sums,\n" +
            "    sum(ujCt) as uj_cts,\n" +
            "    sum(svCt) as sv_cts\n" +
            "from dws_traffic_vc_ch_page_window\n" +
            "where  toYYYYMMDD(stt)=#{date}\n" +
            "group by ch")
    public List<TrafficChBean> trafficCh(
            @Param("date") int  date);
}
